#pragma once

#include <QString>

enum player_index_e {
    PLAYER_INDEX_SYSTEM = 0,
    PLAYER_INDEX_PLAYER_1 = 1,
    PLAYER_INDEX_PLAYER_2 = 2,
    PLAYER_INDEX_MAX
};

enum game_socres_e {
    GAME_SOCRE_BOMB_OPENED = -10,   /* 玩家点击到地雷时的得分 */
    GAME_SOCRE_NOT_BOMB_OPENED = 1, /* 玩家点开非地雷时的得分 */
};

class Player {
public:
    // Getter and Setter for uid_
    uint32_t uid() const { return uid_; }
    void setUid(uint32_t uid) { uid_ = uid; }

    // Getter and Setter for username_
    QString username() const { return username_; }
    void setUsername(const QString& username) { username_ = username; }

    // Getter and Setter for score_
    int score() const { return score_; }
    void setScore(int score) { score_ = score; }

    // Getter and Setter for opened_bombs_num_
    int openedBombsNum() const { return opened_bombs_num_; }
    void setOpenedBombsNum(int num) { opened_bombs_num_ = num; }

    // Getter and Setter for opened_not_bombs_num_
    int openedNotBombsNum() const { return opened_not_bombs_num_; }
    void setOpenedNotBombsNum(int num) { opened_not_bombs_num_ = num; }

private:
    uint32_t uid_ = 0;
    QString username_ = "";
    int score_ = 0;
    int opened_bombs_num_ = 0;
    int opened_not_bombs_num_ = 0;
};
